import cn.wolfcode.domain.Department;
import cn.wolfcode.domain.Employee;
import cn.wolfcode.service.IDepartmentService;
import cn.wolfcode.util.UserContext;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class test {

    @Autowired
    private IDepartmentService departmentService;

    @Test
    public void testList(){
//        List<Department> departments = departmentService.query();
//        System.out.println(departments);
    }

    @Test
    public void testInsert(){
        Department d = new Department();
        d.setName("飞机部");
        d.setSn("jj");
        departmentService.insert(d);
    }
}
